package com.yueyang.sojourn.server.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @author yemingxing
 * @summary
 * @Copyright (c) 2020, Yueyang Group All Rights Reserved.
 * @since 2020-02-15 19:57
 */
@Data
@ApiModel("地理位置信息")
public class GeoLocationDto {
    /**
     * 经度
     */
    @ApiModelProperty(value = "经度", required = true)
    @NotBlank(message = "[经度]不能为空")
    @Digits(integer = 10, fraction = 7, message = "[经度]最多支持7位小数，10位有效数字")
    private String longitude;

    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度", required = true)
    @NotBlank(message = "[纬度]不能为空")
    @Digits(integer = 10, fraction = 7, message = "[纬度]最多支持7位小数，10位有效数字")
    private String latitude;

    /**
     * 经纬度对应地址信息
     */
    @ApiModelProperty(value = "经纬度对应地址信息", required = true)
    @NotBlank(message = "[经纬度对应地址信息]不能为空")
    @Size(max = 150, message = "[经纬度对应地址信息]最多支持150字")
    private String address;
}
